Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi!
I am working on a use case right now where a lot of items are short-lived, i.e. only available for a short period of time. In this case WARP-loss is not optimal since it can sample negative items that were not available when the positive item was relevant.
The following PR modifies the WARP loss by sampling only negative items from a predefined group (it could be month for example). I have seen that this improves the performance substantially in my case. When AUC is measured correctly (i.e. intra-group) it generally is increased by a number of percentage points.
I have added a few tests, and made some modifications to the documentation, but did not spend too much time on these things since I wanted to assess the possibility of including a change like this into the main code before working more on all these bells and whistles.